#import <Cocoa/Cocoa.h>
#import <SMRColumnView/SMRColumnView.h>
#import "SMRManagingWindowController.h"


@class SMRPopoverWindow;

@interface ALTemplateLibraryPopoverController : SMRManagingWindowController <NSWindowDelegate, NSTableViewDelegate, SMRColumnViewDelegate> {
}

@property (nonatomic, retain) IBOutlet SMRColumnView *templateEditorElementsColumnView;
@property (nonatomic, retain) IBOutlet NSView *templateEditorStandardFieldsView;
@property (nonatomic, retain) IBOutlet NSView *templateEditorDocumentView;
@property (nonatomic, retain) IBOutlet NSArrayController *entryTemplatesArrayController;
@property (nonatomic, retain) IBOutlet NSTableView *templateLibraryTableView;
@property (nonatomic, retain) IBOutlet NSButton *templateEditorToggleButton;
@property (nonatomic, retain) IBOutlet NSView *textElementInfoView;
@property (nonatomic, retain) IBOutlet NSView *ratingElementInfoView;
@property (nonatomic, retain) IBOutlet NSView *dateElementInfoView;
@property (nonatomic, retain) NSDictionary *infoViewDictionary;
@property (nonatomic, assign) BOOL entryTemplateSelectionCountIsOne;
@property (nonatomic, copy) NSString *templateEditorMessageString;

-(IBAction)insertElementTemplate:(id)sender;
-(IBAction)toggleElementInfoView:(id)sender;

-(SMRPopoverWindow *)templateLibraryPopover;
-(NSArray *)templateLibrarySortDescriptors;
-(void)displayTemplateLibraryPopoverFromView:(NSView *)targetView;

@end
